<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>用户信息管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/campusinfo/user/">用户信息列表</a></li>
	</ul>
	<form:form id="searchForm" modelAttribute="user" action="${ctx}/campusinfo/user/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li><label>用户名：</label>
				<form:input path="loginName" htmlEscape="false" maxlength="100" class="input-medium"/>
			</li>
			<li><label>学生姓名：</label>
				<form:input path="name" htmlEscape="false" maxlength="100" class="input-medium"/>
			</li>
			<li><label>学号：</label>
				<form:input path="stuId" htmlEscape="false" maxlength="64" class="input-medium"/>
			</li>
			
			<li><label>是否可登陆：</label>
				<form:select path="loginFlag" class="input-medium ">
					<form:option value=" "></form:option>
				<form:options items="${fns:getDictList('yes_no')}" itemLabel="label" itemValue="value" htmlEscape="false" />
				</form:select>
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>用户名</th>
				<th>学生姓名</th>
				<th>学校名称</th>
				<th>学号</th>
				<th>手机</th>
				<th>邮箱</th>
				<th>组别</th>
				<th>是否可以登陆</th>
				<th>最后登陆时间</th>
				<th>备注信息</th>
				<shiro:hasPermission name="user:user:edit"><th>操作</th></shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="user">
			<tr>
				<td><a href="${ctx}/campusinfo/user/form?id=${user.id}">
					${user.loginName}
				</a></td>
				<td>
					${user.name}
				</td>
				<td>
					${user.schoolName}
				</td>
				<td>
					${user.stuId}
				</td>
				<td>
					${user.mobile}
				</td>
				<td>
					${user.email}
				</td>
				<td>
					${user.groupName}
				</td>
				<td>
					<c:choose>
						<c:when test="${user.loginFlag == '0' }">
							否
						</c:when>
						<c:when test="${user.loginFlag == '1' }">
							是
						</c:when>
					</c:choose>

				</td>
				<td>
					<fmt:formatDate value="${user.loginDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
				</td>
				<td>
					${user.remarks}
				</td>
				<shiro:hasPermission name="user:user:edit"><td>
    				<a href="${ctx}/campusinfo/user/form?id=${user.id}">修改</a>
					<a href="${ctx}/campusinfo/user/delete?id=${user.id}" onclick="return confirmx('确认要删除该用户信息吗？', this.href)">删除</a>
					<a href="${ctx}/campusinfocompany/linkCompany/add?user.id=${user.id}" onclick="return confirmx('确认要添加吗？', this.href)">添加资金申请的权限</a>
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>r
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>